<template>
    <div class="about-c">
        <el-form ref="form" :inline="true" :model="form" label-width="80px">
            <el-row type="flex" align="middle">
                <el-col :span="20">
                    <el-form-item label="配送点">
                        <el-select v-model="form.site" placeholder="请选择配送点">
                            <el-option label="猎豹移动" value="shanghai"></el-option>
                            <el-option label="新浪" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="下单时间">
                        <el-col :span="11">
                            <el-date-picker type="date" placeholder="选择日期" v-model="form.start_time" style="width: 100%;"></el-date-picker>
                        </el-col>
                        <el-col class="line" :span="2" style="text-align:center">至</el-col>
                        <el-col :span="11">
                            <el-date-picker type="date" placeholder="选择时间" v-model="form.end_time" style="width: 100%;"></el-date-picker>
                        </el-col>
                    </el-form-item>
                    <el-form-item label="下单类型">
                        <el-select v-model="form.order_type" placeholder="请选择下单类型">
                            <el-option label="包月" value="shanghai"></el-option>
                            <el-option label="包年" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label=" ">
                        <el-select v-model="form.query_type" placeholder="请选择查询方式">
                            <el-option label="微信昵称" value="shanghai"></el-option>
                            <el-option label="收货人姓名" value="beijing"></el-option>
                            <el-option label="收货人电话" value="beijing"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-input v-model="form.query_type_c"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="4">
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit">查询</el-button>
                        <el-button>清空</el-button>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <el-table :data="tableData" stripe border style="width: 100%">
            <el-table-column label="商品" width="180">
                <template slot-scope="scope">
                    {{scope.row.name}}
                </template>
            </el-table-column>
            <el-table-column prop="date" label="买家" width="180"> </el-table-column>
            <el-table-column prop="date" label="下单时间" width="180"> </el-table-column>
            <el-table-column prop="date" label="实付金额" width="180"> </el-table-column>
            <el-table-column prop="date" label="订单类型" width="180"> </el-table-column>
            <el-table-column prop="date" label="配送地点" width="180"> </el-table-column>
            <el-table-column prop="date" label="操作" width="180"> </el-table-column>
        </el-table>
    </div>
</template>

<script>
  export default {
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    created: function(){
        this.$http.post(
        this.GLOBAL.BASE_URL+"manage/orderList",
        {
            size: 10,
            page: 1
        }
        )
        .then((res) => {    //成功的回调
            resolve(res.body);
        })
        .catch((res) => {   //失败的回调
            
        });
    },
    methods: {
        onSubmit() {
            console.log('submit!');
        }
    }
  }
</script>
<style>
.about-c {
    padding-top: 60px;
}
</style>
